package com.leinao.model.service;

import com.leinao.commons.Response;
import com.leinao.job.dto.JobInfoDto;
import com.leinao.login.dto.LoginResultDto;
import com.leinao.model.dto.JobDto;
import com.leinao.model.dto.ModelAttentionInfo;
import com.leinao.model.dto.ModelCategoryDto;
import com.leinao.model.dto.ProjectDto;
import com.leinao.model.model.Model;
import com.leinao.project.dto.PublicProjectListDto;
import com.leinao.team.dto.TeamMemberDto;
import com.leinao.util.page.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: weiwei
 * @Date: 2019/6/3 20:39
 * @Description:
 * @Version 1.0
 */
public interface ModelService {

    /**
      * @Description  关注/取消关注模型
      * @param modelId
      * @param attentionFlag
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:54
      */
    Response<Void> attentionModel(Long modelId, Integer attentionFlag, LoginResultDto userInfo);

    /**
      * @Description 删除模型
      * @param modelId
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:53
      */
    Response<Void> deleteModel(Long modelId,  LoginResultDto userInfo);

    /**
      * @Description 获取用户是否关注模型
      * @param modelId
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:52
      */
    Response<ModelAttentionInfo> getUserAttentionStatus(Long modelId, LoginResultDto userInfo);

    /**
      * @Description    平台用户公开的模型列表
      * @param pageNumber
      * @param pageSize
      * @param categoryId
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:51
      */
    Response<PageInfo> getPublicModels(Integer pageNumber, Integer pageSize, Long categoryId, LoginResultDto userInfo);

    /**
      * @Description 平台用户公开的模型列表(不包含自己创建的)
      * @param pageNumber
      * @param pageSize
      * @param categoryId
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:52
      */
    Response<PageInfo> getPublicModelsExceptOwn(Integer pageNumber, Integer pageSize, Long categoryId, LoginResultDto userInfo);

    /**
      * @Description  用户个人创建模型列表
      * @param pageNumber
      * @param pageSize
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:57
      */
    Response<PageInfo> getUserOwnModels(Integer pageNumber, Integer pageSize, LoginResultDto userInfo);

    /**
      * @Description  关注模型列表
      * @param pageNumber
      * @param pageSize
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:57
      */
    Response<PageInfo> getAttentionModels(Integer pageNumber, Integer pageSize, LoginResultDto userInfo);

    /**
     * 功能描述: 创建模型入库
     * @param userId
     * @param modelName
     * @param modelIntroduction
     * @param projectId
     * @param jobId
     * @Return:com.leinao.commons.Response<java.lang.Void>
     * @Author:HuoPengfei
     * @Date:2019/6/5 15:25
     */
    Response<Void> createModel(String userId,String modelName,String modelIntroduction,Long projectId,Long jobId,String language,String framework,Boolean localUpload);

    /**
      * @Description 用户个人模型列表(创建+关注)
      * @param pageNumber
      * @param pageSize
      * @param userInfo
      * @return
      * @author:    weiwei
      * @Date:  2019/6/11 16:58
      */
    Response<PageInfo> getUserModels(Integer pageNumber, Integer pageSize, LoginResultDto userInfo);


    /**
     * 功能描述: 获取我创建的和我克隆的项目信息
     * @param userId
     * @Return:com.leinao.commons.Response<java.util.List<com.leinao.model.dto.ProjectDto>>
     * @Author:HuoPengfei
     * @Date:2019/6/5 15:25
     */
    Response<List<ProjectDto>> getProName(String userId,String projectName);
    /**
     * 功能描述: 获取任务信息
     * @param projectId
     * @Return:com.leinao.commons.Response<java.util.List<com.leinao.model.dto.JobDto>>
     * @Author:HuoPengfei
     * @Date:2019/6/5 15:25
     */
    Response<List<JobInfoDto>> getJobName(Long projectId, String jobName, LoginResultDto userInfo);
    /**
      * 功能描述: 获取模型的项目列表
      * @param modelId
      * @param currentPage
      * @param pageSize
      * @Return:com.leinao.commons.Response<com.leinao.util.page.PageInfo>
      * @Author:HuoPengfei
      * @Date:2019/6/11 19:14
      */
    Response<PageInfo> getProjectByModelId(Long modelId,Integer type,String userId,Integer currentPage,Integer pageSize);
    /**
      * 功能描述: 获取模型详情
      * @param modelId
      * @Return:com.leinao.commons.Response<com.leinao.model.model.Model>
      * @Author:HuoPengfei
      * @Date:2019/6/11 19:14
      */
    Response<Model> getModelDetail(Long modelId,Integer type,String userId);
    /**
      * 功能描述: 修改模型简介
      * @param id
      * @param userId
      * @param introduction
      * @Return:com.leinao.commons.Response<java.lang.Integer>
      * @Author:HuoPengfei
      * @Date:2019/6/11 19:14
      */
    Response<Integer> updateModelIntro(Long id,String userId,String introduction);
    /**
      * 功能描述: 获取我的模型详情
      * @param modelId
      * @param userId
      * @Return:com.leinao.commons.Response<com.leinao.model.model.Model>
      * @Author:HuoPengfei
      * @Date:2019/6/11 19:14
      */
    Response<Model> getModelDetailForCreate(Long modelId,String userId);
    /**
      * 功能描述: 获取我的模型详情的项目列表
      * @param modelId
      * @param userId
      * @param currentPage
      * @param pageSize
      * @Return:com.leinao.commons.Response<com.leinao.util.page.PageInfo>
      * @Author:HuoPengfei
      * @Date:2019/6/11 19:14
      */
    public Response<PageInfo> getProjectByModelIdForCreate(Long modelId,String userId,Integer currentPage,Integer pageSize);
    /**
      * 功能描述: 公开模型
      * @param userId
      * @param tagList
      * @param userList
      * @param modelId
      * @param modelCoverId
      * @param openAll
      * @Return:com.leinao.commons.Response<java.lang.Integer>
      * @Author:HuoPengfei
      * @Date:2019/6/11 19:15
      */
    Response<Integer> openModel(String userId,Long[] tagList,String[] userList,Long modelId,Long modelCoverId,Boolean openAll);
    /**
      * 功能描述:
      * @param modelId
      * @Return:com.leinao.commons.Response<java.util.List<com.leinao.team.dto.TeamMemberDto>>
      * @Author:HuoPengfei
      * @Date:2019/6/13 18:18
      */
    Response<List<TeamMemberDto>> getPersonalRelation(Long modelId);
    /**
      * 功能描述:
      * @param id
      * @param userId
      * @Return:com.leinao.commons.Response<java.lang.Integer>
      * @Author:HuoPengfei
      * @Date:2019/6/13 18:18
      */
    Response<Integer> deletePersonalRelation(Long id,String userId);
    /**
      * 功能描述:
      * @param modelId
      * @Return:com.leinao.commons.Response<java.util.List<com.leinao.model.dto.ModelCategoryDto>>
      * @Author:HuoPengfei
      * @Date:2019/6/13 18:18
      */
    Response<List<ModelCategoryDto>>getOpenCategory(Long modelId);

    Response<List<Model>>getModelType(String modelIds);


}
